package com.cf.base.http.engine.impl;

import com.alibaba.fastjson.JSON;
import com.cf.base.http.engine.JsonEngine;

/**
 * fastJson 解析器
 *
 * @author yangji
 */
public class FastJsonEngine implements JsonEngine {

    public static JsonEngine create() {
        return new FastJsonEngine();
    }

    @Override
    public <T> T toObject(String jsonText, Class<T> tClass) {
        return JSON.parseObject(jsonText, tClass);
    }
}
